import { ThunkAction } from "redux-thunk";
import { rootState } from "..";
import { thumbdobjtype, usertype } from "../reducers/home";

export type getthumbarr = {
  type: "getthumbarr";
  payload: thumbdobjtype;
};

//登录
export type loginaction = {
  type: "login";
  payload: usertype | {};
};

//改变文章详情的主题
export type changethemetype = {
  type: "changethemeinessay";
  payload: "dark" | "light";
};
export type homeaction = getthumbarr | loginaction | changethemetype;

export type thunkAction = ThunkAction<void, rootState, unknown, homeaction>;
